<link rel="stylesheet" type="text/css" href="<{$smarty.const.APPLICATION_URL}>public/css/thickbox.css" />
<script type="text/javascript" src="<{$smarty.const.APPLICATION_URL}>public/js/thickbox/jquery.js"></script>
<script type="text/javascript" src="<{$smarty.const.APPLICATION_URL}>public/js/thickbox/thickbox.js"></script>
<script type="text/javascript">
var ajax_icon	= '<{$smarty.const.AJAX_INDICATOR_ICON}>';
var xoad_handler = <{$xoad_handler}>
</script>
<iframe name="ifrm_upload" id="ifrm_upload" style="display:none"></iframe>
<div id="content2010_left">
	<{if $MEMBER_LOGIN}>
  	<{if $ALUMNI_ACTION eq "EDIT_PROFILE"}>
      <div class="avatar2010">
        <div class="profileleft2010_title">Profile completion tips</div> 
          <div class="avatar2010_center">
            <ul class="ul_profileviewleft">
              <li class="li_profileviewleft">
              	<a href="<{$smarty.const.APPLICATION_URL}>alumni/profile/edit" class="link_boldviewleft">Avatar (+10%) </a>
              </li>
              <li class="li_profileviewleft">
              	<a href="<{$smarty.const.APPLICATION_URL}>alumni/profile/edit/personal" class="link_boldviewleft">Personal info (+20%)</a>
              </li>
              <li class="li_profileviewleft">
              	<a href="<{$smarty.const.APPLICATION_URL}>alumni/profile/edit/contact" class="link_boldviewleft">Contact info (+20%)</a>
              </li>
              <li class="li_profileviewleft">
              	<a href="<{$smarty.const.APPLICATION_URL}>alumni/profile/edit/pcurrent" class="link_boldviewleft">Current positions (+10%)</a>
              </li>
              <li class="li_profileviewleft">
              	<a href="<{$smarty.const.APPLICATION_URL}>alumni/profile/edit/ppast" class="link_boldviewleft">Past positions (+10%)</a>
              </li>
              <li class="li_profileviewleft">
              	<a href="<{$smarty.const.APPLICATION_URL}>alumni/profile/changepass" class="link_boldviewleft">Change password</a>
              </li>
              <li class="li_profileviewleft">
              	<a href="<{$smarty.const.APPLICATION_URL}>alumni/profile/completion" class="link_boldviewleft">Review your profile</a>
              </li>
              <!-- <li class="li_profileviewleft"><a href="#" class="link_boldviewleft">Ask for a recommentdation</a></li>
              <li class="li_profileviewleft"><a href="#" class="link_boldviewleft">Ask for a recommentdation (+5% for each time you are recommended)</a></li>-->
           	</ul>
            <div align="center" style="height:5px;">&nbsp;</div>
            <div align="center">
              <a href="<{$smarty.const.APPLICATION_URL}>forum/login.php?do=logout" class="btn_editprofile">Log out</a>
            </div>
        </div>               	 	
      </div>
    <{else}>
      <div class="avatar2010">
        <div class="avatar2010_title" style="text-align:left; padding:0px 5px;">Hello: <{$MEMBER_LOGIN.full_name}></div> 
          <div class="avatar2010_center">
          <div class="avatar_2010">
            <a href="#">
              <img src="<{$smarty.const.APPLICATION_URL}>public/css/img/solvay2010_avatar170x180.png" width="170" height="180" alt="" style="background:url(<{$smarty.const.APPLICATION_URL}>images/avatar/<{$MEMBER_LOGIN.avatar}>) center top;" />
            </a>
          </div>
          <div align="center">
            <a href="<{$smarty.const.APPLICATION_URL}>alumni/profile/edit" class="btn_editprofile">Edit my profile</a>
          </div>
          <div align="center" style="height:5px;">&nbsp;</div>
          <div align="center">
            <!--<a href="<{$smarty.const.APPLICATION_URL}>alumni/logout" class="btn_editprofile">Log out</a>-->
            <a href="<{$smarty.const.APPLICATION_URL}>forum/login.php?do=logout" class="btn_editprofile">Log out</a>
          </div>
         </div>               	 	
      </div>
     <{/if}>
  <{else}>
  <div class="avatar2010">
    <div class="avatar2010_title"><div class="title_login2010">LOGIN</div></div> 
      <div class="avatar2010_center">
      <form name="frmActionLogin" id="frmActionLogin" action="<{$smarty.const.APPLICATION_URL}>forum/login.php?do=login" method="post" onsubmit="return checkLogin(this)">
      <input type="hidden" name="redirect" id="redirect" value="<{$strUrlRedirect}>" />
      <input type="hidden" name="do" value="login" />
      <input type="hidden" name="vb_login_username" value="" />
      <input type="hidden" name="vb_login_md5password" value="" />
      <table cellpadding="0" cellspacing="0" border="0" align="center">
            <tr>
                <td align="left" class="text_login">Use name</td>
              </tr>
              <tr>
                <td><input type="text" name="username" id="username" class="input2010_left" /></td>
              </tr>
              <tr>
                <td height="10"></td>
              </tr>
              <tr>
                <td  align="left" class="text_login">Password</td>
              </tr>
              <tr>
                <td><input type="password" name="password" id="password" class="input2010_left" /></td>
              </tr>
              <tr>
                <td height="10"></td>
              </tr>
              <tr>
                <td><input type="submit" name="" class="btn_login2010" value="Sign in" /></td>
              </tr>
              <tr>
                <td height="10"></td>
              </tr>
              <tr>
                <td  class="text_13">Do not have an account yet?</td>
              </tr>
              <tr>
                <td><a href="<{$smarty.const.APPLICATION_URL}>alumni/signup"  class="link_login">Sign up</a></td>
              </tr>
          </table>
  			</form>
    </div>               	 	
  </div>
  <{/if}>
                 
   <div class="share2010">
    <a href="javascript:shareFacebook()">
    	<img src="<{$smarty.const.APPLICATION_URL}>public/images/solvay2010_icon_shareFB192x63.gif" width="192" height="63" alt="" />
    </a>
    <{if $MEMBER_LOGIN}>
      <br /><br />
      <{if $MEMBER_LOGIN.receive_newsletter eq 0}>
        <a href="javascript:getReceiveNewsletter(1)">
          <img src="<{$smarty.const.APPLICATION_URL}>public/images/solvay2010_icon_mail_subcribe192x63.gif" width="192" height="63" alt="" />
        </a>
      <{else}>
       <a href="javascript:getReceiveNewsletter(0)">
          <img src="<{$smarty.const.APPLICATION_URL}>public/images/solvay2010_icon_mail_unsubcribe192x63.gif" width="192" height="63" alt="" />
        </a>
    <{/if}>
    <{/if}>
   </div>
</div>
<script type="text/javascript">
	function innerHTML(p_strId, p_strMsg)
	{
		document.getElementById(p_strId).innerHTML = p_strMsg;
	}
	function getReceiveNewsletter(p_intSet)
	{
		callAJAX('xoad_handler', 'receivenewsletter', $H({value: p_intSet}), getReceiveNewsletter_callBack);
	}
	var getReceiveNewsletter_callBack = function getReceiveNewsletter_callBack(results)
	{
		if ( results == 0 )
			return;
		if ( results == 1 )
		{
			window.location.href = window.location.href;
			alert("Action successfully!");
		}
	}
	
	function shareFacebook()
	{
		window.open("http://www.facebook.com/share.php?u=" + window.location.href);
	}
	function checkLogin(p_objForm)
	{
		if ( trim(p_objForm.username.value) == "" )
		{
			alert("Please input username!");
			p_objForm.username.focus();
			return false;
		}
		if ( trim(p_objForm.password.value) == "" )
		{
			alert("Please input password!");
			p_objForm.password.focus();
			return false;
		}
		p_objForm.vb_login_username.value = p_objForm.username.value;
		p_objForm.vb_login_md5password.value = hex_md5(p_objForm.password.value);//alert(hex_md5(p_objForm.password.value));

		//return false;
	}
	
	
/// convert string into md5

var hexcase = 0;
function hex_md5(s)    
{ 
	return rstr2hex(rstr_md5(str2rstr_utf8(s))); 
}
/*
 * Convert a raw string to a hex string
 */
function rstr2hex(input)
{
  try { hexcase } catch(e) { hexcase=0; }
  var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
  var output = "";
  var x;
  for(var i = 0; i < input.length; i++)
  {
    x = input.charCodeAt(i);
    output += hex_tab.charAt((x >>> 4) & 0x0F)
           +  hex_tab.charAt( x        & 0x0F);
  }
  return output;
}
/*
 * Calculate the MD5 of a raw string
 */
function rstr_md5(s)
{
  return binl2rstr(binl_md5(rstr2binl(s), s.length * 8));
}
/*
 * Convert an array of little-endian words to a string
 */
function binl2rstr(input)
{
  var output = "";
  for(var i = 0; i < input.length * 32; i += 8)
    output += String.fromCharCode((input[i>>5] >>> (i % 32)) & 0xFF);
  return output;
}
/*
 * Convert a raw string to an array of little-endian words
 * Characters >255 have their high-byte silently ignored.
 */
function rstr2binl(input)
{
  var output = Array(input.length >> 2);
  for(var i = 0; i < output.length; i++)
    output[i] = 0;
  for(var i = 0; i < input.length * 8; i += 8)
    output[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (i%32);
  return output;
}

/*
 * Encode a string as utf-8.
 * For efficiency, this assumes the input is valid utf-16.
 */
function str2rstr_utf8(input)
{
  var output = "";
  var i = -1;
  var x, y;

  while(++i < input.length)
  {
    /* Decode utf-16 surrogate pairs */
    x = input.charCodeAt(i);
    y = i + 1 < input.length ? input.charCodeAt(i + 1) : 0;
    if(0xD800 <= x && x <= 0xDBFF && 0xDC00 <= y && y <= 0xDFFF)
    {
      x = 0x10000 + ((x & 0x03FF) << 10) + (y & 0x03FF);
      i++;
    }

    /* Encode output as utf-8 */
    if(x <= 0x7F)
      output += String.fromCharCode(x);
    else if(x <= 0x7FF)
      output += String.fromCharCode(0xC0 | ((x >>> 6 ) & 0x1F),
                                    0x80 | ( x         & 0x3F));
    else if(x <= 0xFFFF)
      output += String.fromCharCode(0xE0 | ((x >>> 12) & 0x0F),
                                    0x80 | ((x >>> 6 ) & 0x3F),
                                    0x80 | ( x         & 0x3F));
    else if(x <= 0x1FFFFF)
      output += String.fromCharCode(0xF0 | ((x >>> 18) & 0x07),
                                    0x80 | ((x >>> 12) & 0x3F),
                                    0x80 | ((x >>> 6 ) & 0x3F),
                                    0x80 | ( x         & 0x3F));
  }
  return output;
}


/*
 * Calculate the MD5 of an array of little-endian words, and a bit length.
 */
function binl_md5(x, len)
{
  /* append padding */
  x[len >> 5] |= 0x80 << ((len) % 32);
  x[(((len + 64) >>> 9) << 4) + 14] = len;

  var a =  1732584193;
  var b = -271733879;
  var c = -1732584194;
  var d =  271733878;

  for(var i = 0; i < x.length; i += 16)
  {
    var olda = a;
    var oldb = b;
    var oldc = c;
    var oldd = d;

    a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);
    d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);
    c = md5_ff(c, d, a, b, x[i+ 2], 17,  606105819);
    b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);
    a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);
    d = md5_ff(d, a, b, c, x[i+ 5], 12,  1200080426);
    c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);
    b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);
    a = md5_ff(a, b, c, d, x[i+ 8], 7 ,  1770035416);
    d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);
    c = md5_ff(c, d, a, b, x[i+10], 17, -42063);
    b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);
    a = md5_ff(a, b, c, d, x[i+12], 7 ,  1804603682);
    d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);
    c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);
    b = md5_ff(b, c, d, a, x[i+15], 22,  1236535329);

    a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);
    d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);
    c = md5_gg(c, d, a, b, x[i+11], 14,  643717713);
    b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);
    a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);
    d = md5_gg(d, a, b, c, x[i+10], 9 ,  38016083);
    c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);
    b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);
    a = md5_gg(a, b, c, d, x[i+ 9], 5 ,  568446438);
    d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);
    c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);
    b = md5_gg(b, c, d, a, x[i+ 8], 20,  1163531501);
    a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);
    d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);
    c = md5_gg(c, d, a, b, x[i+ 7], 14,  1735328473);
    b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);

    a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);
    d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);
    c = md5_hh(c, d, a, b, x[i+11], 16,  1839030562);
    b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);
    a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);
    d = md5_hh(d, a, b, c, x[i+ 4], 11,  1272893353);
    c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);
    b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);
    a = md5_hh(a, b, c, d, x[i+13], 4 ,  681279174);
    d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);
    c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);
    b = md5_hh(b, c, d, a, x[i+ 6], 23,  76029189);
    a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);
    d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);
    c = md5_hh(c, d, a, b, x[i+15], 16,  530742520);
    b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);

    a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);
    d = md5_ii(d, a, b, c, x[i+ 7], 10,  1126891415);
    c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);
    b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);
    a = md5_ii(a, b, c, d, x[i+12], 6 ,  1700485571);
    d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);
    c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);
    b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);
    a = md5_ii(a, b, c, d, x[i+ 8], 6 ,  1873313359);
    d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);
    c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);
    b = md5_ii(b, c, d, a, x[i+13], 21,  1309151649);
    a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);
    d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);
    c = md5_ii(c, d, a, b, x[i+ 2], 15,  718787259);
    b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);

    a = safe_add(a, olda);
    b = safe_add(b, oldb);
    c = safe_add(c, oldc);
    d = safe_add(d, oldd);
  }
  return Array(a, b, c, d);
}

/*
 * These functions implement the four basic operations the algorithm uses.
 */
function md5_cmn(q, a, b, x, s, t)
{
  return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);
}
function md5_ff(a, b, c, d, x, s, t)
{
  return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
}
function md5_gg(a, b, c, d, x, s, t)
{
  return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
}
function md5_hh(a, b, c, d, x, s, t)
{
  return md5_cmn(b ^ c ^ d, a, b, x, s, t);
}
function md5_ii(a, b, c, d, x, s, t)
{
  return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
}

/*
 * Add integers, wrapping at 2^32. This uses 16-bit operations internally
 * to work around bugs in some JS interpreters.
 */
function safe_add(x, y)
{
  var lsw = (x & 0xFFFF) + (y & 0xFFFF);
  var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
  return (msw << 16) | (lsw & 0xFFFF);
}

/*
 * Bitwise rotate a 32-bit number to the left.
 */
function bit_rol(num, cnt)
{
  return (num << cnt) | (num >>> (32 - cnt));
}


function md5_ff(a, b, c, d, x, s, t)
{
  return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
}

/// end convert string into md5

	
</script>
